import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';

Widget _imageWrapper(String imageUrl){
  return SizedBox(
    width: 150,
    height: 200,
    child: CachedNetworkImage(
      imageUrl: imageUrl,
      fit: BoxFit.contain,
      placeholder: ((context, url) => Image.asset('images/avatar.png')),
      errorWidget: (context, url, error) => Image.asset('images/navbar/home_icon.png'),
    ),
  );
}